Optimal. Leaf size=104 \[ \frac {2 (A-B) c \cos (e+f x) (a+a \sin (e+f x))^m}{f (1+2 m) \sqrt {c-c \sin (e+f x)}}+\frac {2 B c \cos (e+f x) (a+a \sin (e+f x))^{1+m}}{a f (3+2 m) \sqrt {c-c \sin (e+f x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.19, antiderivative size = 104, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 2, integrand size = 38, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.053, Rules used = {3050, 2817}
\begin {gather*} \frac {2 c (A-B) \cos (e+f x) (a \sin (e+f x)+a)^m}{f (2 m+1) \sqrt {c-c \sin (e+f x)}}+\frac {2 B c \cos (e+f x) (a \sin (e+f x)+a)^{m+1}}{a f (2 m+3) \sqrt {c-c \sin (e+f x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2817
Rule 3050
Rubi steps
\begin {align*} \int (a+a \sin (e+f x))^m (A+B \sin (e+f x)) \sqrt {c-c \sin (e+f x)} \, dx &=\frac {B \int (a+a \sin (e+f x))^{1+m} \sqrt {c-c \sin (e+f x)} \, dx}{a}-(-A+B) \int (a+a \sin (e+f x))^m \sqrt {c-c \sin (e+f x)} \, dx\\ &=\frac {2 (A-B) c \cos (e+f x) (a+a \sin (e+f x))^m}{f (1+2 m) \sqrt {c-c \sin (e+f x)}}+\frac {2 B c \cos (e+f x) (a+a \sin (e+f x))^{1+m}}{a f (3+2 m) \sqrt {c-c \sin (e+f x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.32, size = 116, normalized size = 1.12 \begin {gather*} \frac {2 \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right ) (a (1+\sin (e+f x)))^m \sqrt {c-c \sin (e+f x)} (-2 B+A (3+2 m)+B (1+2 m) \sin (e+f x))}{f (1+2 m) (3+2 m) \left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right )} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.30, size = 0, normalized size = 0.00 \[\int \left (a +a \sin \left (f x +e \right )\right )^{m} \left (A +B \sin \left (f x +e \right )\right ) \sqrt {c -c \sin \left (f x +e \right )}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 345 vs.
\(2 (106) = 212\).
time = 0.54, size = 345, normalized size = 3.32 \begin {gather*} -\frac {2 \, {\left (\frac {2 \, {\left (\frac {2 \, a^{m} \sqrt {c} m \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + \frac {2 \, a^{m} \sqrt {c} m \sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} - a^{m} \sqrt {c} - \frac {a^{m} \sqrt {c} \sin \left (f x + e\right )^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}}\right )} B e^{\left (2 \, m \log \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + 1\right ) - m \log \left (\frac {\sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + 1\right )\right )}}{{\left (4 \, m^{2} + 8 \, m + \frac {{\left (4 \, m^{2} + 8 \, m + 3\right )} \sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + 3\right )} \sqrt {\frac {\sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + 1}} + \frac {{\left (a^{m} \sqrt {c} + \frac {a^{m} \sqrt {c} \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}\right )} A e^{\left (2 \, m \log \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + 1\right ) - m \log \left (\frac {\sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + 1\right )\right )}}{{\left (2 \, m + 1\right )} \sqrt {\frac {\sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + 1}}\right )}}{f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.37, size = 173, normalized size = 1.66 \begin {gather*} -\frac {2 \, {\left ({\left (2 \, B m + B\right )} \cos \left (f x + e\right )^{2} - 2 \, {\left (A + B\right )} m - {\left (2 \, A m + 3 \, A - 2 \, B\right )} \cos \left (f x + e\right ) - {\left (2 \, {\left (A + B\right )} m + {\left (2 \, B m + B\right )} \cos \left (f x + e\right ) + 3 \, A - B\right )} \sin \left (f x + e\right ) - 3 \, A + B\right )} \sqrt {-c \sin \left (f x + e\right ) + c} {\left (a \sin \left (f x + e\right ) + a\right )}^{m}}{4 \, f m^{2} + 8 \, f m + {\left (4 \, f m^{2} + 8 \, f m + 3 \, f\right )} \cos \left (f x + e\right ) - {\left (4 \, f m^{2} + 8 \, f m + 3 \, f\right )} \sin \left (f x + e\right ) + 3 \, f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a \left (\sin {\left (e + f x \right )} + 1\right )\right )^{m} \sqrt {- c \left (\sin {\left (e + f x \right )} - 1\right )} \left (A + B \sin {\left (e + f x \right )}\right )\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.44, size = 105, normalized size = 1.01 \begin {gather*} -\frac {{\left (a\,\left (\sin \left (e+f\,x\right )+1\right )\right )}^m\,\sqrt {-c\,\left (\sin \left (e+f\,x\right )-1\right )}\,\left (6\,A\,\cos \left (e+f\,x\right )-4\,B\,\cos \left (e+f\,x\right )+B\,\sin \left (2\,e+2\,f\,x\right )+4\,A\,m\,\cos \left (e+f\,x\right )+2\,B\,m\,\sin \left (2\,e+2\,f\,x\right )\right )}{f\,\left (\sin \left (e+f\,x\right )-1\right )\,\left (4\,m^2+8\,m+3\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________